package util;

import java.util.HashMap;

public class GSEX{ 
	private HashMap<String,Integer> SEX2CODE = new HashMap<String, Integer>();
	private HashMap<Integer,String> CODE2SEX = new HashMap<Integer,String>();

	public GSEX() {
		super();
		setSex("MALE",1);
		setSex("FEMALE",2);
	}
	
	public Integer getSex(String sex){
		return SEX2CODE.get(sex);
	}
	
	public String getSex(Integer code){
		return CODE2SEX.get(code);
	}
	
	public void setSex(String sex,Integer code){
		this.SEX2CODE.put(sex, code);
		this.CODE2SEX.put(code, sex);
	}
}
